$(function() {

	var continents = $('select.continents');

	continents.change(function() {
		$this = $(this);
		var senatorCountryId = $this.next('.senator-country-id').val();

		$.ajax({
			async   : true,
			type    : "GET",
			url     : "/a_admin/search/visa/continent.saveContinent",
			dataType: "json",
			data    : {senator_country_id: senatorCountryId, search_visa_continent_id: $this.val()},
			success : function(data){
				if (data.error == 0) {

				} else if (data.error != 0) {
				}
			},
			error : function() {
				alert('Error with requesting ajax data.');
			}
		});
	});
});